export function groupCount(list, columnName) {
  let obj = {};
  list.forEach((item) => {
    const column = item[columnName];
    if (obj[column]) {
      obj[column] += 1;
    } else {
      obj[column] = 1;
    }
  });


  return Object.keys(obj).map((key) => {
    return { column: key, total: obj[key] };
  });
}
